/**
 * Created by Administrator on 2017/9/15.
 */

(function ($){
    $.toObject=function (str){
        var obj={};
        if(str.indexOf("&")!=-1){

            var arr=str.split("&");
            for(i=0;i<arr.length;i++){
                if(arr[i].indexOf("=")!=-1){
                    var arr2=arr[i].split("=");
                    obj[arr2[0]]=arr2[1];
                }else{
                    if(str.indexOf("=")!=-1){
                        var arr2=str.split("=");
                        obj[arr2[0]]=arr2[1];
                    }
                }
            }
        }return obj;
    }

})(jQuery);


